//---------------------------------------------------------------------------- // File: D3DTools.h // Class: D3DTools // Type: Direct3D API Tools Management // Author: Ken Anderson // Date: 10/28/04 // OS dependant: Direct3D // Desc: Provides direct access to the Direct3d tools that will be implemented into // the C3D tools class as a component in the tools. Access to this class should // be limited as long as the system is aware of the current renderer it is using. // Required headers: // 1. D3DTypes.h == Provides the foundation for the D3D Tools class. //---------------------------------------------------------------------------- #ifndef __D3DTOOLS__ #define __D3DTOOLS__ #include "D3DTypes.h" #include "C3DTypes.h" #include "C3DVector.h" class D3DTools { public: //Transfer direct3d to common matrix C3DMatrix* DMTCM(C3DMatrix* pM1, D3DXMATRIX* pM2); D3DXMATRIX* CMTDM(D3DXMATRIX* pM1, const C3DMatrix* pM2); ///////////////////////////////////////// //Matrix ///////////////////////////////////////// C3DMatrix* MatrixInverse(C3DMatrix* pMatrix, float* pfDeterminant, const C3DMatrix* pM); float MatrixDeterminant(const C3DMatrix* pMatrix); C3DMatrix* MatrixRotationX(C3DMatrix* pMatrix, float fAngle); C3DMatrix* MatrixRotationY(C3DMatrix* pMatrix, float fAngle); C3DMatrix* MatrixRotationZ(C3DMatrix* pMatrix, float fAngle); C3DMatrix* MatrixTranslation(C3DMatrix* pMatrix, float x, float y, float z); C3DMatrix* MatrixScaling(C3DMatrix* pMatrix, float x, float y, float z); C3DMatrix* MatrixLookAtLH(C3DMatrix* pMatrix, C3DVector3* pEye, C3DVector3* pAt, C3DVector3* pUp); C3DMatrix* MatrixLookAtRH(C3DMatrix* pMatrix, C3DVector3* pEye, C3DVector3* pAt, C3DVector3* pUp); C3DMatrix* MatrixMultiply(C3DMatrix* pMatrix, const C3DMatrix* pM1, const C3DMatrix* pM2); C3DMatrix* MatrixPerspectiveFovLH(C3DMatrix* pMatrix, float fFOV, float fAspect, float fNear, float fFar); C3DMatrix* MatrixPerspectiveFovRH(C3DMatrix* pMatrix, float fFOV, float fAspect, float fNear, float fFar); }; #endif